home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lantools
/
an110x
/
hellou.c
next >
Wrap
Text File
|
1991-08-21
|
704b
|
28 lines
#include <stdio.h>
#include <nwconn.h>
#include <nwbindry.h>
#include <nwmsg.h>
#define MAX_BINDERY_OBJ_NAME_LEN 48
main()
{
int maxStations;
char message[] = "Hello, universe";
WORD i;
int ccode;
char objectName[MAX_BINDERY_OBJ_NAME_LEN];
WORD objectType;
maxStations = GetMaximumNumberOfStations();
for (i=1; i<=maxStations; i++) {
ccode = GetConnectionInformation(i, objectName, &objectType, (long *)NULL, (BYTE)NULL);
if (ccode)
printf("Unable to get information for connection %u\n", i);
else if (objectType == OT_USER) {
printf("Sent hello to %s at connection %d\n", objectName, i);
SendBroadcastMessage(message, &i, (BYTE *)NULL, 1);
}
}
}